home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LOC / PSTRCPY.C < prev    next >
Text File  |  1991-09-09  |  1KB  |  28 lines

  1. /************************************************************************/
  2. /* Name:  PStrCpy Module Implementation                                    */
  3. /*                                                                        */
  4. /* Purpose:  Replace a Pascal target string with the contents            */
  5. /*     of a Pascal source string.                                        */
  6. /*                                                                        */
  7. /* Author:  Steve Nies                                                    */
  8. /*                                                                        */
  9. /* Date created: 28 April 89                                            */
  10. /*                                                                        */
  11. /* Disclaimer:  This software has been developed privately by the        */
  12. /*     Author and has been released into the Public Domain.  The        */
  13. /*     author makes no claims as to the correctness or suitability        */
  14. /*     of the software for the intended purpose.                        */
  15. /************************************************************************/
  16.  
  17. #include <Style.h>
  18.  
  19. void PStrCpy ( register address target, register address source )
  20.  
  21. BEGIN
  22.   register string src = (string) source;
  23.   register string trgt = (string) target;
  24.   register int length = *src + 1;
  25.   WHILE length-- LOOP
  26.     *trgt++ = *src++;
  27.   END;
  28. END